<html>
<head>
	<script type="text/javascript">
		var aJaxURL = "server-side/tasks/incoming.action.php";	//server side folder url
		var tName = "example";												//table name
		
		$(document).ready(function () {
			/* Table ID, aJaxURL, Action, Colum Number, Custom Request, Hidden Colum, Menu Array */
			GetDataTable(tName, aJaxURL, "get_list", 8, "", 0, "");
		    
	    	$("#" + tName + " tbody").on("click", "tr", function () {
		        var nTds	= $("td", this);
		        var id		= $(nTds[0]).text();
		        var type 	= $(nTds[1]).text();
		        
		        switch (type) {
				  case "შეკვეთა":
				    window.location = "index.php?pg=kitchen_request&do=request_edit&id=" + id;  //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
				    break
				  default:
					window.location = "index.php?pg=overhead&overhead_id=" + id;
				}
		        
		    });
		});
        
    </script>
</head>

<body>
	
    <div id="dt_example" class="ex_highlight_row">
        <div id="container">
            <div id="dynamic">
            	<h2 align="center">შემომავალი დავალებები</h2>
                <table class="display" id="example" style="width: 1024px;">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th >ოპერაცია</th>
                            <th style="width: 15%;">თარიღი</th>
                            <th>საიდ. კოდი</th>
                            <th>მომწოდებელი</th>
                            <th>დოკ. ნომერი</th>
                            <th>თანხა</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr id="search_inits">
                            <th class="colum_hidden">
                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_engine" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_browser" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_platform" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_version" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_grade" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" name="search_grade" value="ფილტრი" class="search_init" />
                            </th>
                    	</tr>
                    </thead>
                </table>
            </div>
            <div class="spacer">
            </div>
        </div>
    </div>
</body>
</html>